import React, { Component } from "react";

import { HashRouter, Route, Switch } from "react-router-dom";
import App from './App'
import Login from './pages/login/Login.jsx'
import Admin from './Admin'
import Button from './pages/ui/buttons'
import Modals from './pages/ui/modals'
import Loading from './pages/ui/Loading'
import NoMatch from './componets/nomatch'
import Notification from './pages/ui/Notification'
import Message from './pages/ui/Message'
import Tabs from './pages/ui/Tabs'
import Gallery from './pages/ui/gallery'
import Carousel from './pages/ui/carousel'
import FromLogin from './pages/from/login'
import Register from './pages/from/register'
import BasicTable from './pages/table/basicTable'
import HighTable from './pages/table/highTable'
import City from './pages/order/order'
import Bar from './pages/echarts/bar/Bar'
import Pie from './pages/echarts/pie/Pie'
import Line from './pages/echarts/line/Line'
import Permission from './pages/permission/Permission'
class IRouter extends Component {
  render() {
    return (
        <HashRouter>
            <App>
                <Route path="/login" component={Login}></Route>
              
                <Route path="/admin" render={() => (
                    <Admin>
                        <Switch>
                        <Route path="/admin/ui/buttons" component={Button}></Route>
                        <Route path="/admin/ui/modals" component={Modals}></Route>
                        <Route path="/admin/ui/loadings" component={Loading}></Route>
                        <Route path="/admin/ui/notification" component={Notification}></Route>
                        <Route path="/admin/ui/messages" component={Message}></Route>
                        <Route path="/admin/ui/tabs" component={Tabs}></Route>
                        <Route path="/admin/ui/gallery" component={Gallery}></Route>
                        <Route path="/admin/ui/carousel" component={Carousel}></Route>
                        <Route path="/admin/form/login" component={FromLogin}></Route>
                        <Route path="/admin/form/reg" component={Register}></Route>
                        <Route path="/admin/table/basic" component={BasicTable}></Route>
                        <Route path="/admin/table/high" component={HighTable}></Route>
                        <Route path="/admin/city" component={City}></Route>
                        <Route path="/admin/charts/bar" component={Bar}></Route>
                        <Route path="/admin/charts/pie" component={Pie}></Route>
                        <Route path="/admin/charts/line" component={Line}></Route>
                        <Route path="/admin/permission" component={Permission}></Route>
                        <Route  component={NoMatch}></Route>
                        </Switch>
                    </Admin>
                )}></Route>
                {/* <Route path="/order/detail" component={Detail}></Route> */}
            </App>
        </HashRouter>
    )
  }
}

export default IRouter;
